docs/setup: unify agent guidance and harden Pi/server provisioning - #61
Merged
Conversation
AGENTS.md becomes the single cross-agent instruction set (Claude Code, opencode, Codex): the former CLAUDE.md content plus a Coding conventions section folded in from the agent-agnostic global rules (no-comments-by-default, no speculative design, boundary-only validation, Bash style). Fix the stale "Codex" reference back to the real "claude-code" custom-install step. CLAUDE.md slims to `@AGENTS.md` + a Claude-Code-only overlay (/verify and /security-review triggers for this repo). Per Anthropic's documented pattern, Claude Code reads only CLAUDE.md and loads AGENTS.md via the import, so there is no double-load; opencode/Codex read AGENTS.md natively. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The 30 P0-P3 findings were detailed in TODO.md and only summarized in the CHANGELOG; the detail lived nowhere else. Move the full record to docs/macos-benchmark-review.md and link it from the changelog entry. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Keep AGENTS.md lean: the deep packages.json schema (per-platform scalar-or-object resolution, environment caveat, tag-filter internals) moves to docs/PACKAGES.md, leaving a one-paragraph summary + a pointer. Deep reference belongs in docs/. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The move (56a2e17) put TODO.md and CHANGELOG.md in docs/ alongside UNIFICATION.md. Repoint links: root/subdir files now prefix docs/ (AGENTS.md, linux-server README/HTTPS); docs/-internal cross-links drop the stale docs/ prefix and use siblings or ../ (CHANGELOG/TODO/UNIFICATION, and TODO's ../linux-server/HTTPS.md). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Main edited the old monolithic CLAUDE.md (linux-pi node description); this branch made AGENTS.md the master doc with CLAUDE.md as an import stub. Kept the stub and applied main's two Pi edits to AGENTS.md, with TODO.md updated to its new docs/TODO.md location. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…m the always-loaded rule The always-loaded railguard rule and the hand-maintained known-bugs tail in CLAUDE.md carried full detail into every prompt. Move expected-behavior detail and the bug-bounty/false-positive log (with upstream issue links) into an on-demand docs/RAILGUARD.md; the rule shrinks to core semantics plus a pointer to read the doc when behavior looks wrong. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rules point at ~/.claude/docs/RAILGUARD.md by path, so install.sh now links docs/ alongside rules/ and validate.sh checks the link. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… 58-61) Review 1 covers AGENTS.md/CLAUDE.md/agentic-ai on this branch (15 findings); Review 2 covers the repo as a whole with emphasis on PRs 58-60 and this PR (15 top findings + confirmed tail). 30 verified findings total, each with verdict and concrete failure scenario. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The cups_default bridge subnet was Docker-assigned, so a network recreate could hand out a different CIDR and silently break the host cupsd.conf `Allow <cidr>` rule (and thus the HTTPS front door). Pin it to 172.21.0.0/16 to match the allow-list in /etc/cups/cupsd.conf. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Pi's CUPS is a family-shared USB printer: family devices print over the LAN via Bonjour (not on the tailnet), while the operator's remote devices use the Tailscale HTTPS sidecar. Hardening it to tailnet-only silently blocks the family, so the policy must allow localhost + the sidecar subnet + the home LAN, and cupsd must answer to the tailnet name plus the LAN/Bonjour names -- without ever using `ServerAlias *` / `Allow all`. Add setup.sh, which renders that ServerAlias/<Location /> policy into /etc/cups/cupsd.conf from a gitignored .env (LAN subnet, hostname, tailnet name stay out of this public repo). It is idempotent, has --dry-run, validates with `cupsd -t`, backs up before writing, and refuses to emit `*`/`all`. .env.example carries placeholders; README.md explains the why. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
4 tasks
ulises-c
marked this pull request as ready for review
July 13, 2026 03:43
The connected unit is a CyberPower CST135UC2 (confirmed via upsc and physical inspection), not the PR1500LCDRT2U the configs and docs claimed. Only the human-readable model label was wrong: the usbhid-ups driver binding (vendorid 0764 / productid 0601) already matched the hardware, so monitoring was unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add the main server agent's Round 1 reply to the PR #61 reply chain: fast-forward to 3ff8624 with a clean worktree, server verify 38/0, and the NUT permission false-negative resolved. AdGuard credential rotation and UPS notify delivery remain not-attempted/unconfirmed this round. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The 'Secondary Server (Pi)' card hard-coded a <pi-hostname> placeholder in its description, which rendered literally on the live dashboard. Move it to HOMEPAGE_VAR_PI_HOSTNAME (real value in the gitignored .env, placeholder in .env.example), matching how the domains are handled. The value is quoted so YAML doesn't misparse the leading {{.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Skips git-tracked paths matching its glob patterns (one per line, # comments) so intentionally non-executable shebang scripts stop blocking session stop. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CI shellcheck fails on the unquoted RHS, but glob matching is the whole point of .driftcheckignore patterns. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Run from git rev-parse --show-toplevel so the check covers the whole repo and ignore patterns match repo-root-relative paths regardless of where the session started. Restore per-repo support alongside the global file: a .driftcheckignore at the repo root is read after ~/.claude/hooks/driftcheck-ignore, same format (#56 follow-up). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Part of #43. This began as the agent-documentation overhaul, then expanded to
resolve the verified findings from the branch-wide reviews rather than leaving
known provisioning and resilience defects behind.
The result has three goals:
AGENTS.mdthe shared instruction source for Claude Code, opencode, andCodex, with
CLAUDE.mdreduced to a Claude-specific overlay.into focused documents instead of loading it into every agent prompt.
privacy gaps found while reviewing PRs DNS robustness: fix bootstrap deadlock + secondary AdGuard on the Pi #58–docs/setup: unify agent guidance and harden Pi/server provisioning #61.
Changes
Agent documentation
AGENTS.mdthe cross-agent source of truth and imports it fromCLAUDE.md.docs/PACKAGES.md, the preserved macOS benchmark review, and focusedRailguard references.
agentic-ai/Claude/and deploys theon-demand docs directory.
Pi and server reliability
degradation, AdGuard consistency, and rendered systemd units.
when driver settings change, bounds notifications, prevents repeated NOCOMM
pushes, and adds server-profile verification.
route and local widget path, adds the Docker provider config, and documents a
subnet-scoped CUPS sidecar configuration.
resolution, logs patch failures, and covers sdX/NVMe/MMC/late-mount behavior
with unit tests.
Verification, portability, and privacy
path instead of committing machine-specific paths.
stale document pointers, rollout state, and migration records.
code-review-1-agents.mdandcode-review-2-repo.md.Verification
setup.sh --dry-runsmoke suite passes on macOS, Ubuntu, Arch, and server.syntax CI jobs pass.
successful patching, and visible patch failure.
Live verification
Host-specific live checks remain for the main server and Pi. The verification
prompts are being prepared separately so each host agent can deploy and report
without changing repository source or exposing secrets.
Deferred follow-ups
The Quad9 bootstrap policy, timer rescheduling from observed durations, sidecar
deduplication, shared backup implementation, and maintenance-frequency tuning
remain explicit follow-ups. They are operational/design choices rather than
known merge blockers.
Notes
maindirectly.are complete.